package dto

import (
	"github.com/e421083458/gin_scaffold/public"
	"github.com/gin-gonic/gin"
)

type DemoInput struct {
	Name   string `json:"name" form:"name" comment:"姓名" example:"姓名" validate:"required"`
	Age    int64  `json:"age" form:"age" comment:"年龄" example:"20" validate:"required"`
	Passwd string `json:"passwd" form:"passwd" comment:"密码" example:"123456" validate:"required"`
}

func (params *DemoInput) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
type Users struct {
	Username string `json:"username" form:"username" comment:"username" example:"姓名" validate:"required"`
	Password string `json:"password" form:"password" comment:"password" example:"123456" validate:"required"`
}
func (params *Users) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
//收款码
type Change struct {
	Mobile string `json:"mobile" form:"mobile" comment:"mobile" example:"手机号" validate:"required"`
	Uid string `json:"uid" form:"uid" comment:"uid" example:"uid" validate:"required"`
}
func (params *Change) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

//短信验证码
type Scode struct {
	Mobile string `json:"mobile" form:"mobile" comment:"mobile" example:"手机号" validate:"required"`
	Code string `json:"code" form:"code" comment:"code" example:"code" validate:"required"`
}
func (params *Scode) BindingValidParams(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}